<?
	// permohonan cuti tahunan
	include("../lib/config.php");
	$nik 		= $HTTP_GET_VARS['nik'];
	$jenis_cuti = $HTTP_GET_VARS['jenis_cuti'];
	$no			= $HTTP_GET_VARS['no'];
	$tahun		= $HTTP_GET_VARS['tahun'];
	
	$sql = mssql_query("WITH limit AS (SELECT ROW_NUMBER() OVER (ORDER BY periode) No, * FROM VCutiTahunan WHERE NIK='".$nik."') SELECT * FROM limit WHERE No='".$no."'",$conn);
	$row = mssql_fetch_array($sql);
	
	// get jabatan
	$sdet = mssql_query("select A.NIK,B.Nama,Uraian,AreaCode from karyawanstatus A, mstjabatan B, MstSO C where A.jabatan=B.kode AND A.kode_so=C.kode_so",$conn);
	$rdet = mssql_fetch_array($sdet);
?>
<link rel="stylesheet" type="text/css" href="../style/style.css">
<title>Permohonan Cuti Tahunan</title>
<table width="100%">
 <tr>
  <td align="center"><b>PERMOHONAN CUTI TAHUNAN</b></td>
 </tr>
 <tr>
  <td><hr noshade size="-2" color="#666666"></td>
 </tr>
 <tr>
  <td>
   <table align="left" border="0" style="font-size:11px;">
    <tr>
     <td width="100">Nama:</td>
     <td width="200"><?=$row[Nama]?></td>
    </tr>
    <tr>
     <td>NIK:</td>
     <td><?=$row[NIK]?></td>
    </tr>
    <tr>
     <td>Jabatan:</td>
     <td><?=$rdet[Nama]?></td>
    </tr>    
    <tr>
     <td>Unit Kerja:</td>
     <td><?=$rdet[AreaCode]." - ".$rdet[Uraian]?></td>
    </tr>    
   </table>
  </td>
 </tr>
 <tr>
  <td><hr noshade size="-2" color="#666666"></td>
 </tr>
 <tr>
  <td>
   <table style="font-size:11px;" align="center">
    <tr>
     <td width="200">Jenis Cuti</td>
     <td><?=$row[NamaCuti]?></td>
    </tr>
    <tr>
     <td>Tanggal Mulai</td>
     <td><?=$row[TglAwal]?></td>
    </tr>
    <tr>
     <td>Tanggal Selesai</td>
     <td><?=$row[TglAkhir]?></td>
    </tr>
    <tr>
     <td>Jumlah Cuti</td>
     <td><?=$row[jml_cuti]?> hari.</td>
    </tr>
    <tr>
     <td>Keterangan</td>
     <td><?=$row[keterangan]?></td>
    </tr>    
   </table>
  </td>
 </tr>
 <tr height="300">
  <td>
  <table style="font-size:11px;" border="0" align="center">
  <tr>
   <td colspan="3" align="right">Jakarta, <?=date("d-m-Y")?></td>
  </tr>
   <tr>
    <td>Menyetujui,
    <br><br><br><br><br><BR>
    _____________________<br>
    NIK: 
    </td>
    <td width="200">&nbsp;</td>
    <td>Pemohon,
    <br><br><br><br><br><BR>
    <u><?=$row[Nama]?></u><br>
    NIK: <?=$row[NIK]?>
    </td>   
   </tr>
  </table>
  </td>
 </tr>
</table>